package cn.com.hori.cms.controller;

import cn.com.hori.cms.ueditor.ActionEnter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;

/**
 * 附件 contorller
 *
 * @author 刘艺
 * @date 2018/3/8 14:54
 */
@RestController
@RequestMapping("/smc/accessories")
public class AccessoriesController {
    private static Logger logger = LoggerFactory.getLogger(AccessoriesController.class);

    @RequestMapping(value = "/exec")
//    @ResponseBody
    public String exec(HttpServletRequest request) throws UnsupportedEncodingException {
        request.setCharacterEncoding("utf-8");
//        String rootPath = request.getSession().getServletContext().getRealPath("/");
        String rootPath = "D:\\Workspaces\\H5Projects";
        return new ActionEnter( request, rootPath ).exec();
    }
}

